FROM openjdk:8-buster

RUN set -ex \
    && cd /tmp \
    && sed -i 's/deb.debian.org/mirrors.aliyun.com/' /etc/apt/sources.list \
    && sed -i 's/security.debian.org/mirrors.aliyun.com/' /etc/apt/sources.list \
    && sed -i 's/security-cdn.debian.org/mirrors.aliyun.com/' /etc/apt/sources.list

ENV DEBIAN_FRONTEND noninteractive

RUN set -ex \
    && cd /tmp \
    && apt-get update -y \
    && apt-get install -y \
      apt-utils procps iputils-ping vim git wget curl zsh maven\
    && rm -rf /var/lib/apt/lists/*

ENV TZ=PRC
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

# check
RUN java -version && mvn -v

WORKDIR /var/www